<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          
 <html xmlns="http://www.w3.org/1999/xhtml" 
 	   xmlns:ui="http://java.sun.com/jsf/facelets"
 	   xmlns:f="http://java.sun.com/jsf/core" 
	   xmlns:h="http://java.sun.com/jsf/html"
	   xmlns:t="http://myfaces.apache.org/tomahawk">
 	<body>
 	<!-- common menu for all pages -->
		<ui:composition>
			<t:panelGrid columns="2">
				<t:outputText value="Creator"/> 
				<t:outputText value="#{manageTestCasesBean.singleTestCase.creator.name}"/>
				<t:outputText value="Modifier"/>
				<t:outputText value="#{manageTestCasesBean.singleTestCase.modifier.name}"/>
				<t:outputText value="Creation date"/> 
				<t:outputText value="#{manageTestCasesBean.singleTestCase.creationDate}">
					<f:convertDateTime pattern="dd-MM-yyyy HH:mm:ss" timeZone= "#{manageTestCasesBean.timeZone}"/>
				</t:outputText>
				<t:outputText value="Modification date"/>
				<t:outputText value="#{manageTestCasesBean.singleTestCase.modificationDate}">
					<f:convertDateTime pattern="dd-MM-yyyy HH:mm:ss" timeZone= "#{manageTestCasesBean.timeZone}"/>
				</t:outputText>
				<t:outputText value="id"/>  
				<t:outputText value="#{manageTestCasesBean.singleTestCase.id}"/>
				<t:outputText value="Test Case Summary"/>
				<t:outputText />
				<t:panelGroup>
					<t:inputText id="summary" label="summary" value="#{manageTestCasesBean.singleTestCase.summary}">
						<f:validateLength minimum="2" maximum="25" />
					</t:inputText>
					<t:message for="summary" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>
				<t:outputText />
				<t:outputText value="Environment"/>
				<t:outputText />
				<t:panelGroup>
					<t:inputTextarea id="environment" label="environment" value="#{manageTestCasesBean.singleTestCase.environment}">
						<f:validateLength minimum="0" maximum="500" />
					</t:inputTextarea>
					<t:message for="environment" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>	
				<t:outputText />
				<t:outputText value="Precondition steps"/>
				<t:outputText />
				<t:panelGroup>
					<t:inputTextarea id="preSteps" label="preSteps" value="#{manageTestCasesBean.singleTestCase.preSteps}">
						<f:validateLength minimum="0" maximum="500" />
					</t:inputTextarea>
					<t:message for="preSteps" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>	
				<t:outputText />
				<t:outputText value="Description"/>
				<t:outputText />
				<t:panelGroup>
					<t:inputTextarea id="description" label="description" value="#{manageTestCasesBean.singleTestCase.description}">
						<f:validateLength minimum="0" maximum="500" />
					</t:inputTextarea>
					<t:message for="description" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>
				<t:outputText />
				<t:outputText value="Expected result"/>
				<t:outputText />
				<t:panelGroup>
					<t:inputTextarea id="expectedResult" label="expectedResult" value="#{manageTestCasesBean.singleTestCase.expectedResult}">
						<f:validateLength minimum="0" maximum="500" />
					</t:inputTextarea>
					<t:message for="expectedResult" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>	
				<t:outputText />
				<t:outputText value="Execution time"/>
				<t:outputText />
				<t:panelGroup>
					<t:inputTextarea id="executionTime" label="executionTime" value="#{manageTestCasesBean.singleTestCase.executionTime}">
						<f:validateDoubleRange minimum="0"  />
					</t:inputTextarea>
					<t:message for="executionTime" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>
				<t:outputText />
				<t:outputText value="Priority" />
				<t:outputText />
				<t:selectOneMenu value="#{manageTestCasesBean.singleTestCase.priority}" >
					<f:selectItems value="#{manageTestCasesBean.priorityList}" />	
				</t:selectOneMenu>	
				<t:outputText />
				<t:outputText value="Type" />
				<t:outputText />
				<t:selectOneMenu value="#{manageTestCasesBean.singleTestCase.type}" >
					<f:selectItems value="#{manageTestCasesBean.typeList}" />	
				</t:selectOneMenu>
				<t:outputText />
				<t:outputText value="Status" />
				<t:outputText />
				<t:selectOneMenu value="#{manageTestCasesBean.singleTestCase.status}" >
					<f:selectItems value="#{manageTestCasesBean.statusList}" />	
				</t:selectOneMenu>
				<t:outputText />
				<t:outputText value="Specification" />
				<t:outputText />
				<t:selectOneMenu value="#{manageTestCasesBean.singleTestCase.specification.summary}" >
					<f:selectItems value="#{manageTestCasesBean.specList}" />	
				</t:selectOneMenu>
				<t:outputText />
				<t:outputText value="Bugs found" />
				<t:selectOneMenu>
					<f:selectItems value="#{manageTestCasesBean.bugs}" />	
				</t:selectOneMenu>
				<t:outputText value="Enter new bug" />
				<t:panelGroup>
					<t:inputText id="searchWordBugID" label="searchWordBugID" value="#{manageTestCasesBean.searchWordBugID}" >
						<f:validateDoubleRange minimum="1"  />	
					</t:inputText>
					<t:message for="searchWordBugID" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>
		  	 	<t:commandButton action="#{manageTestCasesBean.editTestCase}" value="save" />
		   		<t:commandButton action="casesList" value="cancel" />	 	
	   		</t:panelGrid>	
	   </ui:composition>
   </body>
 </html>